ZennoLab Assemblies Documentation
RiseMacros(String,String[]) Method
See Also  Example Send Feedback
ZennoLab.CommandCenter Assembly > ZennoLab.CommandCenter Namespace > Instance Class > RiseMacros Method : RiseMacros(String,String[]) Method
macrosType

Type: System.String

The type of macros.

parameters

Type: System.String[]

An array of parameters for macros.

Glossary Item Box

Executes the specified macros with parameters.

Syntax

C# 
public string RiseMacros( 
   string macrosType,
   string[] parameters
)

Parameters

macrosType

Type: System.String

The type of macros.

parameters

Type: System.String[]

An array of parameters for macros.

Return Value

Type: System.String

The result of the macros. If the value is empty string then an error at runtime.

Remarks

Full description of macros can be found here: Macros.

Example

The following code example demonstrates uses of the RiseMacros method.
C#Copy Code
public static int Execute(Instance instance)
{
    instance.ClearCookie();
 
    Tab tab = instance.ActiveTab;
    if ((tab.IsVoid) || (tab.IsNull)) return -1;
    if (tab.IsBusy) tab.WaitDownloading();
    tab.Navigate("lessons.zennolab.com", "");
    if (tab.IsBusy) tab.WaitDownloading();
            
    HtmlElement he = instance.GetTabByAddress("page").GetDocumentByAddress("0").FindElementByName("text");
            
    string result = instance.RiseMacros("Person.FirstName", new [] { "eng", "male" });
            
    he.SetValue(result, true);
    return 0;
}
PHPCopy Code
public static function Execute($instance)
{
    $instance->ClearCookie();
 
    $tab = $instance->ActiveTab;
    if (($tab->IsVoid) || ($tab->IsNull)) return -1;
    if ($tab->IsBusy) $tab->WaitDownloading();
    $tab->Navigate("lessons.zennolab.com", "");
    if ($tab->IsBusy) $tab->WaitDownloading();
            
    $he = $instance.GetTabByAddress("page").GetDocumentByAddress("0").FindElementByName("text");
            
    $result = $instance->RiseMacros("Person.FirstName", array("eng", "male"));
            
    $he->SetValue($result, true);
    
    return 0;
}

Requirements

Target Platforms: Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2012 All Rights Reserved.